package com.lc.springboot.controller;

import com.lc.springboot.model.User;
import com.lc.springboot.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author lengchuan <lishuijun1992@gmail.com>
 * @date 16-8-24
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private IUserService userService;

    @RequestMapping("/adduser")
    @ResponseBody
    public User addUser(User  user){
        userService.addUser(user);
        return user;
    }
}
